package com.apes.fa.service;

import com.apes.fa.model.FaAssetBorrowReturnSingle;
import com.apes.fa.model.FaAssetsIncreaseDecrease;
import com.apes.fa.respository.FaAssetBorrowReturnSingleRepository;
import com.apes.fa.respository.FaAssetsIncreaseDecreaseRepository;
import com.apes.framework.api.DomainService;
import com.apes.framework.plugin.esb.api.SimpleRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @BelongsProject: apes-server
 * @BelongsPackage: com.apes.fa.service
 * @ClassName: FaAssetsIncreaseDecreaseService
 * @Author: PengZiFeng
 * @Description: 资产增减
 * @CreateTime: 2021-09-06 15:38
 * @Version: 1.0
 */
@Service("faAssetsIncreaseDecreaseService")
public class FaAssetsIncreaseDecreaseService extends DomainService {

    @Autowired
    private FaAssetsIncreaseDecreaseRepository faAssetsIncreaseDecreaseRepository;

    /**
     * 根据卡片id查全部
     */
    public List<FaAssetsIncreaseDecrease> findAll(SimpleRequest request){

        String id = request.get("id");
        List<FaAssetsIncreaseDecrease> faAssetsIncreaseDecreases = faAssetsIncreaseDecreaseRepository.findAllByFaCardId(id);
        return faAssetsIncreaseDecreases;

    }

}
